package com.zyit.controller;

import com.zyit.service.DepartmentService;
import com.zyit.util.Result;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/department")
public class DepartmentController {

    @Resource
    private DepartmentService departmentService;

    @GetMapping
    public Result findAll(){
        return new Result(200,departmentService.findAll(),"");
    }
}
